namespace UniversalAdminSystem.Application.PermissionManagement.Interfaces;

/// <summary>
/// 权限检查服务接口
/// 提供用户权限验证功能
/// </summary>
public interface IPermissionCheckService
{
    /// <summary>
    /// 检查用户是否有指定权限
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="permissionCode">权限编码</param>
    /// <returns>是否有权限</returns>
    Task<bool> CheckUserPermissionAsync(Guid userId, string permissionCode);

    /// <summary>
    /// 检查用户是否有任意一个指定权限
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="permissionCodes">权限编码列表</param>
    /// <returns>是否有权限</returns>
    Task<bool> CheckUserAnyPermissionAsync(Guid userId, IEnumerable<string> permissionCodes);

    /// <summary>
    /// 检查用户是否有所有指定权限
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="permissionCodes">权限编码列表</param>
    /// <returns>是否有权限</returns>
    Task<bool> CheckUserAllPermissionsAsync(Guid userId, IEnumerable<string> permissionCodes);

    /// <summary>
    /// 获取用户的所有权限
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <returns>权限编码列表</returns>
    Task<IEnumerable<string>> GetUserPermissionsAsync(Guid userId);

    /// <summary>
    /// 获取用户的所有角色
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <returns>角色名称列表</returns>
    Task<IEnumerable<string>> GetUserRoleAsync(Guid userId);
}